<table datatable [dtOptions]="dtOptions" [dtTrigger]="dtTrigger"
       id="job-logs-datatable" class="table table-striped table-bordered">
  <thead>
  <tr>
    <th>ID</th>
    <th>Job ID</th>
    <th>Job state</th>
    <th>Event</th>
    <th>Action</th>
    <th>User</th>
    <th>Date</th>
    <th>Message</th>
    <th *permissionLink="['base.exportd.log.delete']">Action</th>
  </tr>
  </thead>
  <tbody>
  <tr *ngFor="let log of activeLogList">
    <td>{{log.public_id}}</td>
    <td>{{log.job_id}}</td>
    <td><cmdb-active-badge [activeStatus]="log.state"></cmdb-active-badge></td>
    <td>{{log.event}}</td>
    <td>{{log.action_name}}</td>
    <td>{{log.user_name}}</td>
    <td>{{log.log_time?.$date | date:"dd/MM/yyyy - HH:mm:ss"}}</td>
    <td>{{log.message}}</td>
    <td *permissionLink="['base.exportd.log.delete']">
      <a class="text-dark ml-1" (click)="deleteEmitter.emit(log.public_id); rerender()">
        <i class="fas fa-trash-alt"></i>
      </a>
    </td>
  </tr>
  </tbody>
</table>
